#include<stdio.h>
int main() {
	int T, K;
	int n1, b, t, n2;
	scanf("%d%d", &T, &K);
	for (int i = 0; i < K; i++)
	{
		scanf("%d%d%d%d", &n1, &b, &t, &n2);
		if (T<t)
		{
			printf("Not enough tokens.  Total = %d.", T);
			
		}
		else
		{
			if (n2 - n1>0)
			{
				if (b == 1)
				{
					T += t;
					printf("Win %d!  Total = %d.", t, T);
				}
				else
				{
					T -= t;
					printf("Lose %d.  Total = %d.", t, T);
				}
			}
			else {
				if (b == 0) {
					T += t;
					printf("Win %d!  Total = %d.", t, T);
				}
				else
				{
					T -= t;
					printf("Lose %d.  Total = %d.", t, T);
				}
			}
		}
		
		printf("\n");
		if (T == 0) {
			printf("Game Over.");
			break;
		}
	}


	
	
	return 0;
}